<form [formGroup]="form">
  <ix-select
    formControlName="key_type"
    [label]="'Key Type' | translate"
    [required]="true"
    [options]="keyTypes$"
    [tooltip]="helptext.add.keyType.tooltip | translate"
  ></ix-select>

  @if (isRsa) {
    <ix-select
      formControlName="key_length"
      [label]="'Key Length' | translate"
      [required]="true"
      [options]="keyLengths$"
      [tooltip]="helptext.add.keyLength.tooltip | translate"
    ></ix-select>
  } @else {
    <ix-select
      formControlName="ec_curve"
      [label]="'EC Curve' | translate"
      [required]="true"
      [options]="ecCurves$"
      [tooltip]="helptext.add.ecCurve.tooltip | translate"
    ></ix-select>
  }

  <ix-select
    formControlName="digest_algorithm"
    [label]="'Digest Algorithm' | translate"
    [required]="true"
    [options]="digestAlgorithms$"
    [tooltip]="helptext.add.digestAlgorithm.tooltip | translate"
  ></ix-select>

  @if (hasLifetime()) {
    <ix-input
      formControlName="lifetime"
      type="number"
      [label]="'Lifetime' | translate"
      [required]="true"
      [tooltip]="helptext.add.lifetime.tooltip | translate"
    ></ix-input>
  }

  <ix-form-actions>
    <button
      mat-button
      matStepperPrevious
      ixTest="back"
    >{{ 'Back' | translate }}</button>
    <button
      mat-button
      matStepperNext
      color="primary"
      ixTest="next"
      [disabled]="form.invalid"
    >{{ 'Next' | translate }}</button>
  </ix-form-actions>
</form>
